# -*- coding: cp936 -*-
#1- import Library
import pygame, math,sys
from pygame.locals import *
#2- Initialize the game
pygame.init()
windowWidth,windowHeight = 480,480
cellSize = 20

playerpos = [100,100]
w = False
a = False
s = False
d = False
screen = pygame.display.set_mode((windowWidth,windowHeight))
def drawgrid():
    
    for i in range(cellSize,windowWidth,cellSize):
        pygame.draw.line(screen,(0.480,0),(i,0),(i,modeHeight),i)
    for j in range(cellSize,windowHeight,cellSize):
        pygame.draw.line(screen,(0.480,0),(0,j),(windowHeight,j),1)
drawgrid()

drawSnake(snake)
pygame.display.update()
#»æÖÆ±í¸ñ

while True:
    screen.fill(0)
   #用户控制，窗口点击事件
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            pygame.quit()
            sys.exit(0) 

    pygame.display.flip()


        



   
    
